package com.ziqing.apeletnews.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.util.Log;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;

import com.ziqing.apeletnews.R;
import com.ziqing.apeletnews.base.BaseActivity;
import com.ziqing.apeletnews.base.BaseAdapter;
import com.ziqing.apeletnews.base.BaseViewHolder;
import com.ziqing.apeletnews.bean.ListBean;

import java.util.List;

/**
 * Created by WT on 2018/4/3.
 */

public class ProduceAdapter extends BaseAdapter<ListBean> {

    private ImageView iv_rencent;
    private TextView tv_content;


    public ProduceAdapter(@NonNull Context mContext, @NonNull List<ListBean> listData, int layoutId) {
        super(mContext, listData, layoutId);
    }

    @Override
    public void onBindViewHolder(BaseViewHolder holder, ListBean data, int position) {
        iv_rencent = holder.getView(R.id.iv_rencent);
        tv_content = holder.getView(R.id.tv_content);

        Glide.with(mContext).load(data.getUrl()).into(iv_rencent);
        tv_content.setText(data.getWord());


    }


}
